<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body>div{
            width: 300px;
            background-color: rgba(0, 0, 0, 0.3) ;
            padding: 10px 0 0 10px;
            position: relative;
        }
        input{
            border: 0;
            text-decoration: none;
            padding: 5px 5px;
        }
        img{
            width: 20px; height: 20px;
            position: absolute;
            top: 13px;
            right: 140px;
        }
        p{
            color: red;
            font-size: 8px;
        }
    </style>
</head>
<body>
<div>
    <input type="text" placeholder="请输入用户名">
    <img  src="../imgs/yhm.png" alt="">
    <p>用户名不能为空</p>
</div>
</body>
</html>